package org.example.bobofish.user.infrastructure.persistence.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.example.bobofish.user.infrastructure.persistence.entity.UserRightsInfo;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface UserRightsInfoDao extends BaseMapper<UserRightsInfo> {

    List<UserRightsInfo> selectListById(String userId);

    Map<String,Object> selectMapById(Long id);

    /**
     * 通过权益类型查询用户信息并分页
     * @param page
     * @param rightType
     * @return
     */
    Page<UserRightsInfo> selectPageVo(@Param("page") Page<UserRightsInfo> page, @Param("rightType") Integer rightType);
}
